/**
 * 研发项目状态流转记录模型
 */
const { BaseModel } = require('../config/models_config');

class ResearchProjectFlowModel extends BaseModel {

	constructor() {
		super();
		this.setCollection('research_project_flow');
	}
}

// 流转类型枚举
ResearchProjectFlowModel.FLOW_TYPE = {
	NORMAL: 0, // 正常流转
	ROLLBACK: 1, // 回退
	BRANCH: 2, // 分支
};

// 流转类型名称
ResearchProjectFlowModel.FLOW_TYPE_NAME = {
	[ResearchProjectFlowModel.FLOW_TYPE.NORMAL]: '正常流转',
	[ResearchProjectFlowModel.FLOW_TYPE.ROLLBACK]: '回退',
	[ResearchProjectFlowModel.FLOW_TYPE.BRANCH]: '分支',
};

// 文档状态枚举
ResearchProjectFlowModel.DOC_STATUS = {
	UNUPLOADED: 0, // 未上传
	UPLOADED: 1, // 已上传
	APPROVED: 2, // 已审核
	REJECTED: 3, // 已驳回
};

// 文档状态名称
ResearchProjectFlowModel.DOC_STATUS_NAME = {
	[ResearchProjectFlowModel.DOC_STATUS.UNUPLOADED]: '未上传',
	[ResearchProjectFlowModel.DOC_STATUS.UPLOADED]: '已上传',
	[ResearchProjectFlowModel.DOC_STATUS.APPROVED]: '已审核',
	[ResearchProjectFlowModel.DOC_STATUS.REJECTED]: '已驳回',
};

module.exports = ResearchProjectFlowModel; 